package actions.create

import actions.Action
import actions.commandsmap.commands.Command
import dsl.parameters.Parameter

class CreateAction extends Action {
    @Override
    String getResultScript() {
        def navigationUrl = baseNavigationURL() + "/" + actionType.label
        String script = navigationCommand(navigationUrl)

        HashMap<Parameter, Command> commands = mapper.mapParametersCommands(parameters)
        commands.entrySet().each {
            script += it.value.getCommand()
        }
        return script
    }
}
